package com.payment.ktb.constants;

/**
 * Created by admin on 2017/12/6.
 */

public enum  ConstantsProfitWithdrawStatus {


    INIT(10, "初始化"),
    WAIT(11, "等待支付"),
    CONF(12, "订单确认"),
    PAYING(13, "支付中"),
    SUCC(20, "处理成功"),
    FAIL(21, "处理失败"),
    FRZE(30, "订单风控"),
    HOLD(99, "订单保留");


    private int code;
    private String desc;

    private ConstantsProfitWithdrawStatus(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    private ConstantsProfitWithdrawStatus() {
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDesc(int code) {

        for (ConstantsProfitWithdrawStatus constantsProfitWithdrawStatus:ConstantsProfitWithdrawStatus.values()) {

            if (constantsProfitWithdrawStatus.getCode() == code) {
                return constantsProfitWithdrawStatus.getDesc();
            }

        }

        return "未知类型";

    }
}
